/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package com.wm.web.taglib;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;
import com.opensymphony.xwork2.util.ValueStack;

/**
 * 功能描述:分页标签
 *
 * 创建日期 May 25, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public class PageTag extends ComponentTagSupport {

	public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {
		return new Page(arg0);
	}

	protected String argPage = "page";

	protected String argTotal = "total";

	private String value;

	public String getArgPage() {
		return argPage;
	}

	public void setArgPage(String argPage) {
		this.argPage = argPage;
	}

	public String getArgTotal() {
		return argTotal;
	}

	public void setArgTotal(String argTotal) {
		this.argTotal = argTotal;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	protected void populateParams() {
		super.populateParams();

		Page tag = (Page) component;
		tag.setArgPage(argPage);
		tag.setArgTotal(argTotal);
		tag.setValue(value);
	}

	
}
